﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NRemedy;
using System.Configuration;

namespace Wicresoft.UnifyShow.BusinessImpl
{
    public class BasicRemedy : IDisposable
    {
        //multi thread ,i think that cann't use the static
        protected ARLoginContext arc;

        public BasicRemedy()
        {
            string ARServer = ConfigurationManager.AppSettings["ARServer"];
            string ARUid = ConfigurationManager.AppSettings["ARUid"];
            string ARPwd = ConfigurationManager.AppSettings["ARPwd"];
            arc = new ARLoginContext(ARServer, ARUid, ARPwd);
        }

        //Transaction
        public ARLoginContext Connection
        {
            get
            {
                return arc;
            }
            set
            {
                arc = value;
            }
        }

        public void Dispose()
        {
            arc.Dispose();
        }
    }
}
